#include <stdio.h>

#define MAX_CARD 280

int main (int argc, const char * argv[]) {
    float len[MAX_CARD];
	int i;
	len[0] = 0;
	for (i=1; i<MAX_CARD; i++) {
		len[i] = len[i-1] + 1.0f / (i+1);
		//printf("%f\n",len[i]);
	}
	float input;
	int start, end, p;
	while(scanf("%f", &input)) {
		if (input == 0) {
			return 0;
		}
		start = 1;
		end = MAX_CARD - 1;
		while (start<end) {
			p = (start + end) / 2;
			if (input > len[p]) {
				start = p+1;
			}
			else {
				end = p;
			}
		}
		printf("%d card(s)\n", start);
	}
    return 0;
}
